home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Games Collection 1 / software vault.zip / software vault / CDR10 / YICN23.ZIP / INCLUDE / YAKWIN.H < prev   
C/C++ Source or Header  |  1993-02-21  |  2KB  |  60 lines

  1. //contains header information for the yakWindows classes; at this
  2. //stage, just yakWindowPane
  3. #ifndef YAKWIN.H
  4. #define YAKWIN.H
  5.  
  6. #include "stddefs.h"
  7. #include "xlib.h"
  8. #include <stdlib.h>
  9.  
  10. class yakWindowPane
  11. {
  12. public:
  13.   word x, y, width, bWidth, height, myOffset;  //bwidth is width in nibbles
  14.   far byte * myGraphicData;
  15.   yakWindowPane(void) {x = y = bWidth = height = myOffset = 0; myGraphicData = NULL;};
  16.   yakWindowPane(word x1, word y1, word x2, word y2);
  17.   ~yakWindowPane() {delete myGraphicData;};
  18.   void reSave(word x1, word y1, word x2, word y2, word offset);
  19.   void save(word x1, word y1, word offset);
  20.   void save(void);
  21.   void restore(word offset);
  22.   void restore(void);
  23. };
  24.  
  25. class yakWindow : public yakWindowPane
  26. {
  27. public:
  28.   static yakWindow * killPointer;
  29.   enum flags {isSizeable = 0x01, isDraggable = 0x02, isCloseable = 0x04, isTemporary = 0x08};
  30.   word myNumber;
  31.   flags myFlags;
  32.   byte titleBarColor, textColor, boxColor;
  33.   char title[80];
  34.   yakWindow * nextWindow, * prevWindow;
  35.   static yakWindow * bottomWindow, * topWindow;
  36.   static yakWindow * activeWindow;
  37.   yakWindow(int x1, int y1, int x2, int y2);
  38.   void open(void);
  39.   void close(void);
  40.   void showActivated(void);
  41.   void showActivated(word offset);
  42.   void showDeActivated(void);
  43.   void showDeActivated(word offset);
  44.   virtual void draw(word offset); //redefine this one!
  45.   virtual void draw(void);
  46.   void shuffleToTop(void);
  47.   virtual word interpretMouseClick(void);
  48.   virtual word interpretKeyStroke(char myChar);
  49.   void drag(void);
  50.   void size(void);
  51.   virtual int isSelected(void);
  52.   virtual int isDragSelected(void);
  53.   virtual int isSizeSelected(void);
  54.   virtual int isCloseSelected(void);
  55.   static void drawAll(void);
  56.   static void selectToTop(void);
  57.   static word advance(void);
  58. };
  59.  
  60. #endif